package com.int_tech.car.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by liubch on 2017/11/19.
 */
@Entity
@Table(name = "c_car_open")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class CarOpenInfo {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(length = 8)
    private Integer id;

    //车牌号
    @Column(length = 64)
    private String carNumber;

    //开关门状态（1，开门；2，关门）
    @Column(length = 2)
    private int openStatus;

    //开关门地点
    @Column(length = 64)
    private String address;

    //场站id
    @Column(length = 8)
    private int stationId;

    //场站名称
    @Column(length = 64)
    private String stationName;

    //开关门时间
    @Column(length = 64)
    private String time;

    //创建时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(updatable = false)
    private Date createTime;

    //x
    private String lng;

    //y
    private String lat;

    //异常位置名称
    private String aName;

    //任务编号
    @Column(length = 64)
    private String messionNumber;
}
